package testcase.cell;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.NoSuchElementException;
import junitx.util.PrivateAccessor;

import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import satir.card.Card;
import satir.card.Deck;
import satir.cell.ActionCell;
import satir.player.Player;

public class ActionCell_cellAction extends TestCase{

	private final ByteArrayOutputStream outContent = new ByteArrayOutputStream(); 
	private final ByteArrayOutputStream errContent = new ByteArrayOutputStream(); 
	
	
	@Before
	public void setUp() throws Exception {
		   System.setOut(new PrintStream(outContent));     
		   System.setErr(new PrintStream(errContent)); 
	}

	@After
	public void tearDown() throws Exception {
		   System.setOut(null);     
		   System.setErr(null); 
	}

	@Test
	public void testCellAction() {
		
		
		
		Player player=new Player();
		ActionCell ActCell=new ActionCell(0, 0, '0', '0',"0", null);
		
		try {
			ActCell.cellAction(player);
		
		} catch (NoSuchElementException e) {
			e.printStackTrace();
		}
		assertEquals("Empty Cell!Nothing to do!!!\r\n", outContent.toString());
		
	}
	
}
